package com.tjec.project.businessWorkbench.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.tjec.framework.aspectj.lang.annotation.Excel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.data.annotation.Transient;

import com.tjec.framework.web.domain.BaseEntity;
import com.tjec.framework.web.domain.TreeEntity;
import com.tjec.project.system.domain.BmsMdBusinessCategory;
import com.tjec.project.system.domain.SysMenu;

import io.swagger.annotations.ApiModelProperty;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 任务管理对象 bms_business_task
 * 
 * @author pangyongfeng
 * @date 2020-04-22
 */
public class BmsBusinessTask extends BaseEntity {
	private static final long serialVersionUID = 1L;

	/** id 主键 */
	@JsonIgnore
	private String id;

	/** 业务ID */
	@ApiModelProperty(value = "业务ID")
	private String businessId;

	/**
	 * 子任务集合
	 */
	private List<BmsBusinessTask> children = new ArrayList<BmsBusinessTask>();

	/** 主任务名称 */
	@ApiModelProperty(value = "主任务名称")
	@Excel(name = "主任务名称")
	private String parentName;
	
	/** 任务名称 */
	@ApiModelProperty(value = "任务名称")
	@Excel(name = "任务名称")
	private String name;

	/** 是否里程碑（0否，1是） */
	@ApiModelProperty(value = "是否里程碑，0=否，1=是")
	@Excel(name = "是否里程碑", readConverterExp = "0=否,1=是")
	private String milestoneFlag;

	/** 任务状态（0未完成，1已完成） */
	@ApiModelProperty(value = "任务状态，0=未完成，1=已完成")
	//@Excel(name = "任务状态", readConverterExp = "0=未完成,1=已完成")
	private String status;

	/** 执行人id */
	@ApiModelProperty(value = "执行人id")
	private String executeBy;
	
	/** 计划开始时间 */
	@ApiModelProperty(value = "计划开始时间")
	//@Excel(name = "计划开始时间", width = 30, dateFormat = "yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date planStartTime;
	/* 计划开始时间起，查询用 */
	private String planStartDateStart;
	/* 计划开始时间止，查询用 */
	private String planStartDateEnd;

	/** 计划结束时间 */
	@ApiModelProperty(value = "计划结束时间")
	//@Excel(name = "计划结束时间", width = 30, dateFormat = "yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date planEndTime;
	/* 计划结束时间起，查询用 */
	private String planEndDateStart;
	/* 计划结束时间止，查询用 */
	private String planEndDateEnd;
	
	/** 实际开始时间 */
	@ApiModelProperty(value = "实际开始时间")
	//@Excel(name = "实际开始时间", width = 30, dateFormat = "yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date actualStartTime;
	/* 实际开始时间起，查询用 */
	private String actualStartDateStart;
	/* 实际开始时间止，查询用 */
	private String actualStartDateEnd;

	/** 实际结束时间 */
	@ApiModelProperty(value = "实际结束时间")
	//@Excel(name = "实际结束时间", width = 30, dateFormat = "yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date actualEndTime;
	/* 实际结束时间起，查询用 */
	private String actualEndDateStart;
	/* 实际结束时间止，查询用 */
	private String actualEndDateEnd;

	/** 执行人名字 */
	@ApiModelProperty(value = "执行人姓名")
	//@Excel(name = "执行人")
	private String nickName;
	
	public String getParentName() {
		return parentName;
	}

	public void setParentName(String parentName) {
		this.parentName = parentName;
	}

	public String getTaskRemark() {
		return taskRemark;
	}

	public void setTaskRemark(String taskRemark) {
		this.taskRemark = taskRemark;
	}

	@ApiModelProperty(value = "参与人姓名，多人用英文都好分割")
	//@Excel(name = "参与人")
	private String joinByName;
	
	//@Excel(name = "备注")
	private String taskRemark;
	
	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getJoinByName() {
		return joinByName;
	}

	public void setJoinByName(String joinByName) {
		this.joinByName = joinByName;
	}

	/** 参与人 ，多人用英文分号,分隔 */
	@ApiModelProperty(value = "参与人id")
	private String joinBy;

	/** guid */
	@ApiModelProperty(value = "任务id")
	private String guid;

	/** taskParentId */
	@ApiModelProperty(value = "任务父id")
	private String taskParentId;

	public String getActualStartDateStart() {
		return actualStartDateStart;
	}

	public void setActualStartDateStart(String actualStartDateStart) {
		this.actualStartDateStart = actualStartDateStart;
	}

	public String getActualStartDateEnd() {
		return actualStartDateEnd;
	}

	public void setActualStartDateEnd(String actualStartDateEnd) {
		this.actualStartDateEnd = actualStartDateEnd;
	}

	public String getActualEndDateStart() {
		return actualEndDateStart;
	}

	public void setActualEndDateStart(String actualEndDateStart) {
		this.actualEndDateStart = actualEndDateStart;
	}

	public String getActualEndDateEnd() {
		return actualEndDateEnd;
	}

	public void setActualEndDateEnd(String actualEndDateEnd) {
		this.actualEndDateEnd = actualEndDateEnd;
	}

	public String getPlanStartDateStart() {
		return planStartDateStart;
	}

	public void setPlanStartDateStart(String planStartDateStart) {
		this.planStartDateStart = planStartDateStart;
	}

	public String getPlanStartDateEnd() {
		return planStartDateEnd;
	}

	public void setPlanStartDateEnd(String planStartDateEnd) {
		this.planStartDateEnd = planStartDateEnd;
	}

	public String getPlanEndDateStart() {
		return planEndDateStart;
	}

	public void setPlanEndDateStart(String planEndDateStart) {
		this.planEndDateStart = planEndDateStart;
	}

	public String getPlanEndDateEnd() {
		return planEndDateEnd;
	}

	public void setPlanEndDateEnd(String planEndDateEnd) {
		this.planEndDateEnd = planEndDateEnd;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getId() {
		return id;
	}

	public void setBusinessId(String businessId) {
		this.businessId = businessId;
	}

	public String getBusinessId() {
		return businessId;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setMilestoneFlag(String milestoneFlag) {
		this.milestoneFlag = milestoneFlag;
	}

	public String getMilestoneFlag() {
		return milestoneFlag;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getStatus() {
		return status;
	}

	public void setExecuteBy(String executeBy) {
		this.executeBy = executeBy;
	}

	public String getExecuteBy() {
		return executeBy;
	}

	public void setJoinBy(String joinBy) {
		this.joinBy = joinBy;
	}

	public String getJoinBy() {
		return joinBy;
	}

	public Date getActualStartTime() {
		return actualStartTime;
	}

	public void setActualStartTime(Date actualStartTime) {
		this.actualStartTime = actualStartTime;
	}

	public Date getActualEndTime() {
		return actualEndTime;
	}

	public void setActualEndTime(Date actualEndTime) {
		this.actualEndTime = actualEndTime;
	}

	public void setGuid(String guid) {
		this.guid = guid;
	}

	public String getGuid() {
		return guid;
	}

	public void setPlanStartTime(Date planStartTime) {
		this.planStartTime = planStartTime;
	}

	public Date getPlanStartTime() {
		return planStartTime;
	}

	public void setPlanEndTime(Date planEndTime) {
		this.planEndTime = planEndTime;
	}

	public Date getPlanEndTime() {
		return planEndTime;
	}

	@Override
	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId())
				.append("businessId", getBusinessId()).append("taskParentId", getTaskParentId())
				.append("name", getName()).append("milestoneFlag", getMilestoneFlag()).append("status", getStatus())
				.append("remark", getRemark()).append("executeBy", getExecuteBy()).append("joinBy", getJoinBy())
				.append("actualStartTime", getActualStartTime()).append("actualEndTime", getActualEndTime())
				.append("createBy", getCreateBy()).append("createTime", getCreateTime())
				.append("updateBy", getUpdateBy()).append("updateTime", getUpdateTime()).append("guid", getGuid())
				.append("planStartTime", getPlanStartTime()).append("planEndTime", getPlanEndTime()).append("parentName",getParentName()).toString();
	}

	public String getTaskParentId() {
		return taskParentId;
	}

	public void setTaskParentId(String taskParentId) {
		this.taskParentId = taskParentId;
	}

	public List<BmsBusinessTask> getChildren() {
		return children;
	}
	
	 public void setChildren(List<BmsBusinessTask> children)
	    {
	        this.children = children;
	    }
}
